The present invention relates to a method for managing recording areas, which is suitable for application for the recording and playback of data, such as moving picture data, that needs to be recorded or read out at high speed in a prescribed cycle, and more particularly to a method for managing fragmented areas, a method for processing error recovery, and a storage apparatus using these methods.
Fragmented area management methods employed in a conventional storage apparatus will be described first.
In a recording apparatus for reading and writing data on a recording medium, such as a magnetic disk or an optical disk, with a read/write head moving relative to the recording medium, there occurs a time interval during which read/write operations cannot be performed, for example, when the read/write head is being moved for positioning or when the read/write head is waiting for the desired data to rotate beneath it.
One example of the conventional magnetic disk apparatus will be described with reference to FIG. 23, which is a schematic plan view showing a magnetic disk, etc. in the conventional magnetic disk apparatus.
In FIG. 23, the magnetic disk 182 is a magnetic recording medium on which data are recorded as magnetizations. A head 188 converts an electrical signal into a magnetic field, or a magnetic field into an electrical signal, to record data on the magnetic disk 182 or to read data on the magnetic disk 182. An arm 187 supports the head 188 thereon and moves it across the surface of the magnetic disk 182. Tracks 183 are concentric circles into which the surface of the magnetic disk 182 is divided, each track 183 serving as a unit of storage area. Each track 183 is divided into sectors 184 of equal size which also serve as storage area units, each sector 184 being the smallest access unit of the magnetic disk 182.
The tracks 183 are labelled with track numbers starting from the innermost or outermost track, while the sectors 184 within each track 183 are assigned sector numbers. Any storage area on the magnetic disk can therefore be identified by the track number and sector number, such as "sector 5" on "track 2". In the magnetic disk apparatus, data can be accessed on a sector-by-sector basis, which means that when a file consists of a plurality of sectors, all the sectors constituting the file are not necessarily contained within one track or stored sequentially in contiguous tracks. In an extreme case, there can occur a file consisting of a sector located in the outermost track and a sector located in the innermost track.
To read data recorded on the magnetic disk 182 having the above-mentioned configuration, first the head 188 moves to the track containing the sector where the desired data is recorded. Next, the head 188 waits for the specified sector to be brought beneath the head 188 by the rotation of the magnetic disk 182, and then reads out the data recorded on that sector. At this time, if the next data to read is located in an adjacent sector, the data can be read continuously without moving the head 188 and without a rotational delay. In contrast, if the data stored are scattered over non-contiguous sectors or fragmented, the three-step process consisting of moving the head 188, waiting for disk rotation, and reading out data must be repeated for each sector. Accordingly, when reading data in non-contiguous sectors, the time required to move the head 188 and the rotational delay add to the data non-readable time, as compared when reading data in contiguous sectors.
On the other hand, when recording a sequence of data on the magnetic disk 182, the data are recorded by finding empty sectors contiguous to each other or available in ascending order of track and sector numbers. As recording and erasing operations are repeated on the magnetic disk 182, the empty areas become fragmented into smaller areas; when data are recorded in such fragmented areas, the read/write speed of the storage apparatus slows, degrading the overall performance of the storage apparatus.
With regard to this problem, a number of methods for managing recording areas have been proposed that are aimed at preventing disk read/write speed from slowing down even if recording and erasing operations are repeated, and thus ensuring full performance of the storage apparatus.
In one such method, areas constituting files and empty areas are managed using a plurality of continuous areas, and one example of this method is disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488. The recording area management method disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488, is applicable for a storage apparatus that uses a rewritable optical disk. According to the storage apparatus of this prior art, to record a file in a single continuous area, each continuous area is managed using its start and end positions or its length, and based on the size of the file to be recorded, a search is made for an empty area long enough to record the file; it is claimed that this simplifies the area management and achieves high-speed read/write operations.
Furthermore, an example of a storage apparatus that ensures storing each file in contiguous empty areas is disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369. In the storage apparatus of this prior art, file reallocation is performed in which any file located after an empty area is moved forward to fill the empty area, thereby moving the empty area rearward. According to the storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369, it is claimed that, by evaluating the time required for the file reallocation and the size of the resulting contiguous empty areas, effective file reallocation is achieved to secure contiguous empty areas.
The conventional storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488, which is designed to record data by searching empty area management information for an empty area long enough to record the data, has had the problems that it requires a search time before starting the recording, and also that the method cannot be applied unless the size of the file to be recorded is known in advance.
Further, the conventional storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369, which is designed to secure contiguous empty areas by performing file reallocation, has had the problem that the time required to evaluate the efficiency of reallocation and to reallocate the files increases as the magnetic disk capacity increases.
Next, error recovery processing methods employed in the conventional storage apparatus will be described.
Storage apparatus capable of random accessing, such as magnetic disk and optical disk apparatus, have built-in error recovery functions in order to improve recording or readout reliability. Such error recovery functions include, for example, a retry process in which a record or read operation is retried on an area where an error has occurred, and a reassignment process in which a logical block address previously assigned to an error area is reassigned to another area and data on this is registered in a defective area table to inhibit the use of the error area.
These error recovery processes, however, have had the problem that they are not suitable for real-time processing since the processing for error recovery takes long time compared to read/write operations, and in the case of the retry process, the completion time of the processing cannot be estimated because the same process is repeated.
One example of the conventional magnetic disk recording apparatus will be described with reference to FIG. 24. FIG. 24 is a plan view showing in schematic form the configuration of the conventional magnetic disk here, the parts identical in configuration and function to those shown in FIG. 23 are designated by the same numerals.
In FIG. 24, the recording surface of the magnetic disk 182 as a magnetic recording medium is divided into concentric circles, thus forming a plurality of tracks 183 as storage area units. Each track 183 consists of a plurality of sectors 184 each of which is the smallest access unit. The head 188 records data on the magnetic disk 182, or reads out data on the magnetic disk 182. The arm 187 has the function of supporting the head 188 thereon and moving it across the surface of the magnetic disk 182.
Each sector 184 is assigned a logical block address 185 which is a logical area number. An alternate sector 186 is a sector used in place of the sector 184 in the event of a failure of the latter. Since each sector 184 has the logical block address 185 as a logical area number, any storage area on the magnetic disk 182 can be identified by the logical block address 185.
To read data recorded on the magnetic disk 182 having the above-mentioned configuration, first it is determined to which sector on which track the sector 184 holding the data specified by the logical block address 185 corresponds.
Next, the head 188 is moved to the track 183 containing the thus determined sector. The head 188 moved to the specified track 183 waits until the specified sector 184 is brought beneath the head 188 by the rotation of the magnetic disk 182, and then reads out the desired data.
When recording data also, the head 188 is moved to the empty sector 184 specified by the logical block address 185, as in the above-mentioned read operation, and records the data on that sector.
If an error occurs when recording or reading at the logical block address 185, the recording or reading operation is retried after slightly shifting the position of the head 188. This retry operation is repeated a prescribed number of times until proper recording or reading is done.
If recording cannot be done on the specified sector 184 after repeating the retry operation, a reassignment operation is performed by first reassigning the logical block address 185 originally assigned to the error sector 184 to the alternate sector 186 and then performing a record operation on the alternate track 186. In the read operation, if the data can be read out after repeating the retry operation the prescribed number of times, a reassignment operation is performed by first copying the data held in the sector 184 to the alternate sector 186 and then reassigning the logical block address 185 originally assigned to the error sector 184 to the alternate sector 186.
In the above-mentioned error recovery process, not only a rotational delay occurs while waiting for the head 188 to arrive at the position of the specified sector, but also the head 188 is being moved back and forth. The error recovery thus takes time for processing compared to a normal operation, rendering the method unsuitable for an apparatus that requires high-speed processing such as real-time processing.
To overcome the above-mentioned problem, there has been proposed a storage apparatus which is disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-111035. The storage apparatus disclosed in this publication is constructed in such a manner that a single recording area is divided into areas for recording data that requires high reliability and areas for recording data that requires high processing speed rather than reliability, and the error recovery processing method is switched between different modes according to the type of recording area.
It is proposed that this conventional storage apparatus be used as an apparatus for continuously recording large volumes of data such as video signals, by switching the record/playback operations between a mode that gives priority to data reliability and a mode that omits error recovery operations and gives priority to high-speed processing, according to the position and attribute of the recording areas, for example, management areas and data areas.
However, in the conventional storage apparatus (Hei 7-111035), since the configuration involves dividing the recording area and changing error processing modes for each recording area, the mode of record/playback operation is selected based on the position and attribute of each recording area, without regard to the present load of the recording/playback apparatus. As a result, when the load of the record/playback operation varies, the mode of record/playback operation is always selected by assuming the heaviest load condition. This has presented a problem in that error recovery is not performed even when the load is light and error recovery can be performed.
The entire disclosure of the Japanese Patent Applications No. Hei 1-236488, Hei 7-200369 and Hei 7-111035 including specification, claims, drawings and summary are incorporated herein by reference in its entirety.